<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
    <div class="layui-form timo-compile">
    <form th:action="@{/business/salary/save}">
        <input type="hidden" name="id" th:if="${salary}" th:value="${salary.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">工资金额</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="money" placeholder="请输入工资金额" th:value="${salary?.money}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">发放日期</label>
            <div class="layui-input-inline">
                <input class="layui-input" readonly="readonly" id="payDate" type="text" name="payDate"
                       placeholder="请输入发放日期" th:value="${salary!=null?#dates.format(salary.payDate, 'yyyy-MM-dd'):''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">人员ID</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="userId" placeholder="请输入人员ID" th:value="${salary?.userId}">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="remark">[[${salary?.remark}]]</textarea>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
    <script>
        layui.use(['laydate'], function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '#payDate'
            });
        });
    </script>
</body>
</html>